package com.design.observer.gper;



import java.util.Observable;

public class GPer extends Observable {

    private String name = "GPer生态圈";
    private static GPer gPer = new GPer();


    private GPer() {
    }


    public static GPer getInstance() {
        return gPer;
    }

    public void publishQuestion(Question question) {
        System.out.println(question.getUserName() + "在 " + this.name + "上提交了一个问题。");
        setChanged();
        notifyObservers(question);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}
